<extend name="Base/common"/>
<block name="style">
    <link href="__CSS__/event.css" rel="stylesheet" type="text/css"/>
</block>
<block name="body">
	<div class="col-xs-12">
        {:W('Common/Adv/render',array(array('name'=>'index_event')))}
    </div>
    <div class="col-xs-12">
    	<div class="events">
			<div class="head">
				<h2>活动列表<span>/</span><small style="font-weight: bold;color:#bdbdbd;">ACTIVITY</small></h2>
				<div class="event_btnwp">
					<if condition="is_login() eq 0">
			        	<a href="javascript:;" onclick="toast.error({:L('_ERROR_START_AFTER_LOGIN_')},{:L('_TIP_TENDER_')})">{:L('_EVENT_SPONSOR_')}</a>
			        <else/>
			        	<a href="{:U('Event/Index/add')}">{:L('_EVENT_SPONSOR_')}</a>
			    	</if>
				</div>
			</div>
		<if condition="$type_id eq 0">
			<volist name="type" id="top">
			<div class="event-title">
				<h3 class="flag{$i}">{$top.title}</h3><span class="line flag{$i}"></span><a href="{:U('index',array('type_id'=>$top['id'],'norh'=>$norh))}" class="more more{$i}">More</a>
			</div>
			<div class="event-list">
				<ul>
					<if condition="$top['event']">
					<volist name="top['event']" id="topevent">

					<li><a href="{:U('Event/Index/detail',array('id'=>$topevent['id']))}">{$topevent.title}</a><if condition="time() lt $topevent['eTime']"><span class="status" style="background: #ec6b18;">正在进行</span><else/><span class="status" style="background: #666;">已结束</span></if><span class="num">{$topevent.signCount}报名</span></li>
					</volist>
					<else />
					<li style="background:none;font-size:14px;text-align: center;">该分类暂时还没有活动！</li>
					</if>
				</ul>
			</div>
			</volist>
			<if condition="$rec_event">
			<div class="event-title">
				<h3 class="flag3">精选活动</h3><span class="line flag3"></span><a href="javascript:;" class="more more3">More</a>
			</div>
			<div class="event-list">
				<ul>
					<volist name="rec_event" id="rec">
						<li><a href="{:U('Event/Index/detail',array('id'=>$rec['id']))}">{$rec.title}</a><if condition="time() lt $rec['eTime']"><span class="status" style="background: #ec6b18;">正在进行</span><else/><span class="status" style="background: #666;">已结束</span></if><span class="num">{$rec.signCount}报名</span></li>
					</volist>
					
				</ul>
			</div>
			</if>
		<else />
			<div class="event-title">
				<h3 class="flag3">精选活动</h3><span class="line flag3"></span><a href="javascript:;" class="more more3">More</a>
			</div>
			<div class="event-list">
				<ul>
					<volist name="contents" id="vo">
						<li><a href="{:U('Event/Index/detail',array('id'=>$vo['id']))}">{$vo.title}</a><span class="num">{$vo.signCount}报名</span></li>
					</volist>
					
				</ul>
			</div>
			<div class="pull-right">
            	{:getPagination($totalPageCount,1)}
        	</div>
		</if>
		
		</div>
	</div>
	



</block>

<block name="script">
    <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <script type="text/javascript" src="__JS__/event.js"></script>
    <script>
        $(function () {
            $('#top_nav >li >a ').mouseenter(function () {
                $('.children_nav').hide();
                $('#children_' + $(this).attr('data')).show();
            });



        })
    </script>

</block>










